from appium.webdriver.common.appiumby import AppiumBy
from appium.webdriver.webdriver import WebDriver

from app_practice.app_wework_po.frame.base_page import BasePage


class MainPage(BasePage):
    _MENU_CONTACTLIST = AppiumBy.XPATH, "//*[@text='通讯录']"
    """首页"""

    def goto_contactlist(self):
        """进入到通讯录"""
        # 进入【通讯录】页面
        self.find_and_click(self._MENU_CONTACTLIST)
        from app_practice.app_wework_po.page.contact_list_page import ContactListPage
        return ContactListPage(self.driver)
